<script setup>
function submit() {
  let male = document.getElementById("male")
  let female = document.getElementById("female")

  if (male.checked || female.checked){
    console.log("提交信息")
  }
  else {
    console.log("不提交信息")

  }
}
</script>

<template>
  <form action="https://httpbin.org/get" method="get">
    <label for="male">
      <input type="radio" name="gender" id="male" value="男" >男
    </label>

    <label for="female">
      <input type="radio" name="gender" id="female" value="女">女
    </label>

    <input type="reset" value="重置">
    <input type="submit" value="提交" v-on:click="submit">
  </form>
</template>

<style scoped>

</style>